//
// Created by 39442 on 2025/10/4.
//

#include "task.h"
Task::Task() :result_(nullptr) {}

//执行函数
void Task::exec() {
    if (result_ != nullptr)
        result_->setVal(run());
}

void Task::setResult(Result* res)
{
    result_ = res;
}